<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<!DOCTYPE html>
<html>
	<head>
		<title>计划统计</title>
		<meta name="decorator" content="default"/>
		<script src="${ctxStatic}/echarts/echarts.min.js"></script>
		<script src="https://cdn.bootcss.com/echarts/3.5.4/echarts.min.js"></script>
	</head>
	<body>
		<ul class="nav nav-tabs">
			<li class="active"><a href="#">计划统计</a></li>
		</ul>
	    <!-- 为 ECharts 准备一个具备大小（宽高）的 DOM -->
	    <div id="main" style="width: 600px;height:400px;"></div>
		    <script type="text/javascript">
	        // 基于准备好的dom，初始化echarts实例
	        var myChart = echarts.init(document.getElementById('main'));
	        var str = eval('(${bookStatistic})'); //解析json
	
	        // 指定图表的配置项和数据
	        var option = {
	            title: {
	                text: '书单建立统计'
	            },
	            tooltip: {},
	            legend: {
	                data:['数量']
	            },
	            xAxis: {
	                data: ["前天","昨天","今天"]
	            },
	            yAxis: {},
	            series: [{
	                name: '数量',
	                type: 'bar',
	                data: [str[0].twoday,str[0].oneday,str[0].today]
	            }]
	        };
	
	        // 使用刚指定的配置项和数据显示图表。
	        myChart.setOption(option);
	    </script>
	</body>
</html>